import java.util.Scanner;
public class money
{
	public static void main (String arg[])
	{
	  Scanner reader = new Scanner(System.in);
	  double x = reader.nextDouble();
	  double y ;
	  if(x<=15)
	  {
	    y=4*x/3;
	  }
	  else
	  {
	    y=2.5*x-17.5;
	  }
		System.out.printf("%.2f",y);
	}
}
